//
//  loginViewController.m
//  LaGou
//
//  Created by 苗钧豪 on 16/7/23.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "loginViewController.h"

@interface loginViewController ()

@end

@implementation loginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    // Do any additional setup after loading the view.
    UITextField *namefield = [[UITextField alloc]initWithFrame:CGRectMake(100, 100, 100, 50)];
    namefield.placeholder = @"请输入用户名";
    [self.view addSubview:namefield];
    
    UITextField *passwordfield = [[UITextField alloc]initWithFrame:CGRectMake(100, 200, 100, 50)];
    passwordfield.placeholder = @"请输入密码";
    [self.view addSubview:passwordfield];
    
    UIButton *btn = [UIButton buttonWithType:(UIButtonTypeSystem)];
    btn.frame = CGRectMake((self.view.bounds.size.width / 2) - 100, (self.view.bounds.size.height / 2) - 40, 200, 80);
    btn.backgroundColor = [UIColor orangeColor];
    [btn addTarget:self action:@selector(back:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:btn];
}
- (void)back:(UIButton *)btn {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
